package org.ytor.core.sqlflow.plugin;

import java.util.ArrayList;
import java.util.List;

/**
 * created by yangtong on 2025/8/13 22:26:12
 * <br/>
 * SQL 拦截器管理
 */
public class InterceptorManager {

    private static List<Interceptor> interceptors = new ArrayList<>();

    /**
     * 注册拦截器
     */
    public static void register(Interceptor interceptor) {
        interceptors.add(interceptor);
    }

    /**
     * 注册拦截器
     */
    public static void register(List<Interceptor> interceptors) {
        InterceptorManager.interceptors.addAll(interceptors);
    }

    /**
     * 获取所有拦截器
     */
    public static List<Interceptor> interceptors() {
        return interceptors;
    }

}
